<?php 

 header("Content-type: text/html; charset=utf-8");
require("conn.php");

$user = $_POST['user'];
$user=json_decode($user,true);


$sql = "select * from user where tel =".$user['tel']." ";
$result=mysql_query($sql,$conn);
if($result){
	$row = mysql_fetch_assoc($result);
}

if ($row['password']==$user['password']) {
	echo  json_encode($row);
}else{
	echo 'no';
}